﻿<%@ Page Language="C#" AutoEventWireup="true" Async="true" ValidateRequest="false" CodeBehind="Mail.aspx.cs" Inherits="KlageSystem.Mail" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Afsend e-mail</title>
    <script type="text/javascript" src="scripts/jquery.min.js"> </script>
    <script lang="javascript" type="text/javascript" src="scripts/ckeditor.js"></script>
    <script lang="javascript" type="text/javascript">
        function benny() {
            if (confirm('Er du sikker, at du vil afsende mailen til Skat?')) {
                for (var instanceName in CKEDITOR.instances) {
                    CKEDITOR.instances[instanceName].updateElement();
                    $("#hiddenText").val(CKEDITOR.instances[instanceName].getData());
                }
                $("body").addClass("loading");
                return true;
            }
            else
                return false;
        }
    </script>
    <link rel="stylesheet" type="text/css" href="scripts/contents.css" />
    <style>
        body {
            margin: 0px;
            padding: 0px;
        }

        #buttonWrapper {
            position: absolute;
            right: 0px;
            top: 0px;
            height: 30px;
            width: 200px;
            text-align: center;
            padding-top: 10px;
        }
        /* Start by setting display:none to make this hidden.
   Then we position it in relation to the viewport window
   with position:fixed. Width, height, top and left speak
   speak for themselves. Background we set to 80% white with
   our animation centered, and no-repeating */
        .modal {
            display: none;
            position: absolute;
            z-index: 1000;
            top: 0;
            left: 0;
            height: 100%;
            width: 100%;
            background: rgba( 255, 255, 255, .8);
            background-repeat: no-repeat;
            background-image: url('images/FhHRx.gif');
            background-position: 50% 50%;
            filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#4cffffff', endColorstr='#4cffffff');
        }

        /* When the body has the loading class, we turn
   the scrollbar off with overflow:hidden */
        body.loading {
            overflow: hidden;
        }

            /* Anytime the body has the loading class, our
   modal element will be visible */
            body.loading .modal {
                display: block;
            }
    </style>


</head>
<body>
    <form id="form1" runat="server">
        <div id="buttonWrapper">
            <asp:Button ID="btnLuk" runat="server" Text="Annuller" OnClick="btnLuk_Click" />&nbsp;<asp:Button ID="btnSend" runat="server" Text="Send email" OnClientClick="return benny()" OnClick="btnSend_Click" />
        </div>
        <div id="wrapperDiv" style="">
            <asp:TextBox ID="txtEmail" Columns="80" Rows="100" TextMode="MultiLine" runat="server" ValidateRequestMode="Disabled"></asp:TextBox>
            <script lang="javascript" type="text/javascript">
                CKEDITOR.replace('txtEmail', {
                    uiColor: '#14B8C4',
                    height: '3000px'
                });
            </script>
        </div>
        <asp:HiddenField ID="hiddenText" runat="server" />
    </form>
        <div class="modal"><!-- Place at bottom of page --></div>
</body>
</html>
